﻿//===============================================================================
// Microsoft Platform Architecture Team
// LitwareHR - S+S Sample Application
//===============================================================================
// Copyright  Microsoft Corporation.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Syndication;
using System.ServiceModel.Web;
using System.Text;
using System.Xml;
using GeoRss;

namespace SyndicationServiceLibrary
{
    public class GeoFeed : IGeoFeed
    {
        public SyndicationFeedFormatter CreateFeed()
        {
            GeoRssData geoData = new GeoRssData("Mount Saint Helens - Mount Margaret Trail", "Trailheads and campsites in the Mount Margaret area of Mount Saint Helens, WA");

            geoData.AddPoint("Lakes Trailhead", "This is where we started our hike, just down the road from the visitor center. You could also start at the visitor center.", 46.2913246, -122.2658157 );
            geoData.AddPoint("Snow Lake Camp", "Our first night. Small, clear lake. Cold and without much sun, but a lovely spot!", 46.3321785,-122.15183258);
            geoData.AddPoint("Shovel Lake Camp", "A nice spot for lunch and quick dip (brrrr!).", 46.3316395, - 122.133036);
            geoData.AddPoint("Panhandle Lake Camp", "We stayed here night #2. It's not far from our first night, but allowed us time to explore the Whittier Ridge trail and swim in the lake.", 46.3323506, -122.11964607).Link = "http://dev.live.com/virtualearth/sdk/img/hiking_icon.gif";

            geoData.AddPolygon("Coldwater Lake", "Formed by the 1980 eruption of Mount St. Helens.", "46.31409 -122.22616 46.31113 -122.22968 46.31083 -122.23320 46.29802 -122.25877 46.29245 -122.26641 46.29286 -122.26392 46.28746 -122.26744 46.28741 -122.26006 46.29049 -122.25955 46.29120 -122.25620 46.28924 -122.255430 46.30271 -122.23251 46.31284 -122.22315 46.31409 -122.22616").Link = "http://dev.live.com/virtualearth/sdk/img/hiking_icon.gif";

            geoData.AddLine("Walk back to the car.", "A long walk back to our car.", "46.28548 -122.25302 46.28489 -122.25492 46.28322 -122.25774 46.28298 -122.25908 46.28337 -122.26040 46.28524 -122.26272 46.285882 -122.26596 46.28652 -122.26736 46.28662 -122.26912 46.28847 -122.27216 46.28963 -122.27268 46.28915 -122.27066 46.28975 -122.26916 46.29141 -122.267146");
            
            SyndicationFeed feed = GeoRssFeedBuilder.GetFeed(geoData);
            return new Rss20FeedFormatter(feed);
        }
    }
}
